package nancal.mp.db.mongo.entity.admin

import nbcp.base.db.IdName
import nbcp.base.db.annotation.Cn
import nbcp.base.db.annotation.DbEntityGroup
import nbcp.base.db.annotation.DbEntityIndex
import nbcp.base.db.annotation.DbEntityIndexes
import nbcp.myoql.db.mongo.entity.BasicUser
import org.springframework.data.mongodb.core.mapping.Document

/**
 * 平台员工
 */
@Document
@DbEntityGroup("admin")
@DbEntityIndexes(DbEntityIndex("loginName", unique = true))
open class AdminUser(
    @Cn("岗位")
        var duty: String = "",
    var isAdmin: Boolean = false, //是否是超级管理员
    var address: String = "",
    var roles: MutableList<IdName> = mutableListOf(),
) :  BasicUser()